package com.lw.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 用户表 实体类。
 *
 * @author lw
 * @since 2025年04月29日 10:54:31
 */
@Schema(name = "用户表")
@Table("tb_user")
@Data
public class TbUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    @Schema(description = "")
    private Integer id;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String name;

    /**
     * 登录名
     */
    @Schema(description = "登录名")
    private String loginName;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 角色id
     */
    @Schema(description = "角色id")
    private Integer roleId;

    /**
     * 单位
     */
    @Schema(description = "单位")
    private String company;

    /**
     * 编码
     */
    @Schema(description = "编码")
    private String code;

    /**
     * 联系人
     */
    @Schema(description = "联系人")
    private String contact;
    /**
     * 电话
     */
    @Schema(description = "电话")
    private String phone;

    /**
     * 行业
     */
    @Schema(description = "行业")
    private String industry;

    /**
     * 地址
     */
    @Schema(description = "地址")
    private String address;

    /**
     * 状态：success，info
     */
    @Schema(description = "状态：success，info")
    private String status;

    /**
     * 接口数量
     */
    @Schema(description = "接口数量")
    private Integer interfaceCount;

    /**
     * 意图
     */
    @Schema(description = "意图")
    private String purpose;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 到期时间
     */
    @Schema(description = "到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;

    @Schema(description = "秘钥id")
    private Integer keyId;


    @Schema(description = "备注")
    private String note;

    @Column(ignore = true)
    List<TbMenu> tbMenuList;

    @Column(ignore = true)
    TbRole tbRole;

    @Column(ignore = true)
    List<TbInterface> tbInterfaceList;

    @Column(ignore = true)
    TbKey tbKey;

}
